package com.heima.a01interfacedemo1;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86131
 * Date: 2024-02-17
 * Time: 15:26
 */
public class Frog extends Animal implements Swim{

    public Frog() {
    }

    public Frog(String name, int age) {  //构造方法
        super(name, age);
    }

    //需要重写父类的抽象类和接口里的抽象类
    @Override
    public void eat() {
        System.out.println("青蛙在吃虫子");
    }

    @Override
    public void swim() {
        System.out.println("青蛙在蛙泳");
    }
}
